package create.single;

/**
 * @AUTHOR LYF
 * @DATE 2022/3/12
 * @VERSION 1.0
 * @DESC
 * 不存在安全隐患，在加载类时已经将对象实例化
 */
public class HungrySingleton {
    private static HungrySingleton instance = new HungrySingleton();
    private HungrySingleton(){
    }
    static HungrySingleton getInstance(){
        return instance;
    }
}
